import http from "@/utils/http";

export const getTreeApi = () => {
  return http({
    url: "sys/sysMenu/getTree",
  }
  )
};

export const saveApi = (form) => {
  return http({
    url: "sys/sysMenu/save",
    method:"Put",
    data:form
  }
  )
};

export const getByIdApi = (id) => {
  return http({
    url: "sys/sysMenu/getById",
    method:"GET",
    params:{
      id
    }
  }
  )
};

export const updateApi = (form) => {
  return http({
    url: "sys/sysMenu/update",
    method:"POST",
    data: form
  }
  )
};


export const delApi = (ids) => {
  console.log(ids)
  return http({
    url: "sys/sysMenu/del?ids="+ids,
    method: "DELETE"
  })
}
